import request from '../utils/request'

export default {
  getAll () {
    return request.get('/api/navigation')
  },
  create (name, icon, link, priority) {
    return request.post(
      '/api/navigation',
      { name, icon, link, priority }
    )
  },
  update (id, name, icon, link, priority) {
    return request.post(
      'api/navigation',
      { id, name, icon, link, priority }
    )
  },
  remove (id) {
    return request.delete('/api/navigation/' + id)
  }
}
